/**
 * 添加或者修改页面
 */
var CbMessagesInfoDlg = {
    data: {
        id: "",
        message: "",
        status: "",
        createTime: "",
        createUser: "",
        updateTime: "",
        updateUser: "",
        messageUserid: "",
        type: ""
    }
};
function showMessagesUserIdDiv(obj){
    var val = $(obj).val();
    console.log(val);
    $("#messageUseridDiv").show();
    if (val=='stu' ) {
        //是
    } else if (val=='staff' ) {
        //否
    }else if (val=='company' ) {
    }else{
        $("#messageUseridDiv").hide();
    }
}
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;

















    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
        var ajax = new $ax(Feng.ctxPath + "/cbMessages/send_sys_msg", function (data) {
            Feng.success("添加成功！");
            window.location.href = Feng.ctxPath + '/cbMessages'
        }, function (data) {
            Feng.error("添加失败！" + data.responseJSON.message)
        });
        ajax.set(data.field);
        ajax.start();

        return false;
    });

    $('#cancel').click(function(){
        window.location.href = Feng.ctxPath + '/cbMessages'
    });

});